* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: #f5f5f5;
}

/* 暗黑模式下的body背景色 */
body.dark-theme {
  background-color: #1a1a1a;
}

/* 亮色主题（默认） */
.app-container {
  position: relative;
  width: 400px;
  max-height: 540px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 顶部导航栏样式 */
.top-navbar {
  display: flex;
  align-items: center;
  padding: 0px 16px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  height: 35px;
  flex-shrink: 0;
}

.logo {
  margin-right: 16px;
}

.logo-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.nav-items {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #495057;
}

.nav-item:hover {
  background-color: #e9ecef;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-text {
  font-size: 14px;
  font-weight: 500;
}

/* 暗色主题 */
.app-container.dark-theme {
  background-color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-theme .top-navbar {
  background-color: #2d2d2d;
  border-bottom: 1px solid #3d3d3d;
}

.dark-theme .nav-item {
  color: #e0e0e0;
}

.dark-theme .nav-item:hover {
  background-color: #3d3d3d;
}

.dark-theme .main-content {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

/* 暗色主题下的搜索框 */
.dark-theme .search-box {
  background-color: #2d2d2d;
  border: 2px solid #3d3d3d;
}

.dark-theme .search-input {
  color: #e0e0e0;
}

.dark-theme .search-input::placeholder {
  color: #888888;
}

.dark-theme .search-button {
  background-color: #444444;
}

.dark-theme .search-button:hover {
  background-color: #555555;
}

/* 暗色主题下的搜索结果 */
.dark-theme .word-item {
  border-bottom: 1px solid #3d3d3d;
}

.dark-theme .word-item:hover {
  background-color: #2d2d2d;
}

.dark-theme .search-result-word {
  color: #e0e0e0;
}

.dark-theme .word-meaning {
  color: #b0b0b0;
}

/* 暗色主题下的滚动条 */
.dark-theme .search-results::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.dark-theme .search-results::-webkit-scrollbar-thumb {
  background: #555555;
}

.dark-theme .search-results::-webkit-scrollbar-thumb:hover {
  background: #666666;
}

/* 主内容区域样式 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
}

/* 搜索框样式 */

.search-box {
  display: flex;
  align-items: center;
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: #2c3e50;
}

.search-input::placeholder {
  color: #95a5a6;
}

.search-button {
  padding: 12px 16px;
  border: none;
  background-color: #cbced0;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background-color: #acafb1;
}

/* 搜索结果样式 */
.search-results {
  flex: 1;
  overflow-y: auto;
}

.word-detail {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.word-item {
  padding: 10px;
  border-bottom: 1px solid #ecf0f1;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.word-item:hover {
  background-color: #f8f9fa;
}

.word-item:last-child {
  border-bottom: none;
}

.search-result-word {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.meaning {
  font-size: 14px;
  color: #7f8c8d;
  line-height: 1.4;
}

/* 滚动条样式 */
.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
  background: #bdc3c7;
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: #95a5a6;
}

.fontawesome-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}